﻿<%@ Page Language="C#" MasterPageFile="~/WebAdminWithConfirmation.master" AutoEventWireup="true"
    CodeBehind="editUser.aspx.cs" Inherits="Salient.Web.Administration.Security.Users.editUser" %>

<asp:Content ID="Content1" runat="server" ContentPlaceHolderID="buttons">
    <asp:Button ValidationGroup="none" Text="Back" ID="DoneButton" OnClick="ReturnToPreviousPage"
        runat="server" />
</asp:Content>
<asp:Content ID="Content2" runat="server" ContentPlaceHolderID="titleBar">
    <asp:Literal ID="Literal1" runat="server" Text="<%$ Resources:UpdateUser %>" />
</asp:Content>
<asp:Content ID="Content3" runat="server" ContentPlaceHolderID="content">
    <div style="width: 750">
        <asp:Literal ID="Literal2" runat="server" Text="<%$ Resources:Instructions %>" />
        <br />
        <br />
    </div>
    <br />
    <table cellspacing="0" cellpadding="0" border="0" width="750">
        <tbody>
            <tr align="left" valign="top">
                <td width="62%" height="100%" class="lbBorders">
                    <table cellspacing="0" width="100%" cellpadding="0" border="0">
                        <tr class="callOutStyleLowLeftPadding">
                            <td colspan="4">
                                <asp:Literal ID="Literal3" runat="server" Text="<%$ Resources:User %>" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <table class="bodyText" bordercolor="#CCDDEF">
                                    <tr>
                                        <td width="2em">
                                        </td>
                                        <td>
                                            <asp:Label ID="Label1" runat="server" AssociatedControlID="UserID" Text="<%$ Resources:UserID %>" />
                                        </td>
                                        <td>
                                            <asp:TextBox runat="server" ID="UserID" MaxLength="255" TabIndex="101" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td width="2em">
                                            <img id="Img1" runat="server" src="../../Images/requiredBang.gif" alt="<%$ Resources:Required %>" />
                                        </td>
                                        <td>
                                            <asp:Label ID="Label2" runat="server" AssociatedControlID="Email" Text="<%$ Resources:EmailAddress %>" />
                                        </td>
                                        <td>
                                            <asp:TextBox runat="server" ID="Email" MaxLength="128" TabIndex="102" />
                                        </td>
                                        <td colspan="3">
                                            <asp:CheckBox runat="server" ID="ActiveUser" Text="<%$ Resources:ActiveUser %>" Checked="true" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td width="2em">
                                        </td>
                                        <td>
                                            <asp:Label ID="Label3" runat="server" AssociatedControlID="Description" Text="<%$ Resources:Description %>" />
                                        </td>
                                        <td>
                                            <asp:TextBox runat="server" ID="Description" />
                                        </td>
                                        <td colspan="3">
                                            <asp:Button runat="server" ID="SaveButton" OnClick="SaveClick" Text="<%$ Resources:Save %>"
                                                Width="100" />
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                    </table>
                </td>
                <td width="32%" height="100%">
                    <table borderwidth="1px" cellpadding="0" cellspacing="0" height="100%" width="100%">
                        <tbody>
                            <tr class="callOutStyleLowLeftPadding" height="1">
                                <td valign="top">
                                    <asp:Literal ID="Literal4" runat="server" Text="<%$ Resources:Roles %>" />
                                </td>
                            </tr>
                            <tr valign="top">
                                <td class="userDetailsWithFontSize" height="100%">
                                    <asp:Panel runat="server" ID="Panel1" ScrollBars="auto" valign="top">
                                        <asp:Label runat="server" ID="SelectRolesLabel" Text="<%$ Resources:SelectRoles%>" />
                                        <br />
                                        <asp:Repeater runat="server" ID="CheckBoxRepeater">
                                            <ItemTemplate>
                                                <asp:CheckBox runat="server" ID="checkBox1" Text='<%# Container.DataItem.ToString()%>'
                                                    Checked='<%# (CurrentUser == null) ? false : (bool)CallWebAdminHelperMethod(false, "IsUserInRole", new object[] {(string) CurrentUser, (string) Container.DataItem.ToString()}, new Type[] {typeof(string),typeof(string)})%>' />
                                                <br />
                                            </ItemTemplate>
                                        </asp:Repeater>
                                    </asp:Panel>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </td>
            </tr>
        </tbody>
    </table>
    (<asp:Image ID="Image1" runat="server" ImageUrl="../../Images/requiredBang.gif" AlternateText="<%$ Resources:Required %>" />)
    <asp:Literal ID="Literal5" runat="server" Text="<%$ Resources:RequiredField %>" />
    </div>
    <br />
    <asp:ValidationSummary ID="Validationsummary1" runat="server" HeaderText="<%$ Resources:PleaseCorrect %>" />
    <asp:RequiredFieldValidator ID="Requiredfieldvalidator1" runat="server" ControlToValidate="UserID"
        EnableClientScript="false" ErrorMessage="<%$ Resources:UserIDRequired %>" Display="none" />
    <asp:RegularExpressionValidator ID="Regularexpressionvalidator1" runat="server" ControlToValidate="Email"
        EnableClientScript="false" ErrorMessage="<%$ Resources:InvalidEmailFormat %>"
        Display="none" ValidationExpression="\S+@\S+\.\S+" />
    <asp:RequiredFieldValidator ID="Requiredfieldvalidator2" runat="server" ControlToValidate="Email"
        EnableClientScript="false" ErrorMessage="<%$ Resources:EmailRequired %>" Display="none" />
    <asp:CustomValidator runat="server" ID="PlaceholderValidator" ControlToValidate="UserID"
        EnableClientScript="false" ErrorMessage="<%$ Resources:InvalidInput %>" OnServerValidate="ServerCustomValidate"
        Display="none" />
</asp:Content>
<%-- Confirmation Dialog --%>
<asp:Content ID="Content4" runat="server" ContentPlaceHolderID="dialogTitle">
    <asp:Literal ID="Literal6" runat="server" Text="<%$ Resources:UserManagement %>" />
</asp:Content>
<asp:Content ID="Content5" runat="server" ContentPlaceHolderID="dialogContent">
    <asp:Literal runat="server" ID="DialogMessage" />
</asp:Content>
<asp:Content ID="Content6" runat="server" ContentPlaceHolderID="dialogBottomLeftLink">
    <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="~/security/Security.aspx"
        Text="<%$ Resources:GoHome %>" />
</asp:Content>
<asp:Content ID="Content7" runat="server" ContentPlaceHolderID="dialogBottomLeftButton">
    <asp:Button runat="server" ID="AddAnother" EnableViewState="false" OnClick="AddAnother_Click"
        Text="<%$ Resources:AddAnother %>" Width="100" />
</asp:Content>
<asp:Content ID="Content8" runat="server" ContentPlaceHolderID="dialogBottomRightButton">
    <asp:Button ID="Button1" runat="server" OnClick="OK_Click" Text="<%$ Resources:OK %>"
        Width="75" />
</asp:Content>
